//
//  UIView+Extension.h
//  JiaoX
//
//  Created by jiaoxiu－004 on 14-10-11.
//  Copyright (c) 2014年 北京娇羞科技有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (Extension)
@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGSize size;
- (UIViewController*)viewController;

/**
 从xib加载控件
 需要将xib的file's owner设置为self
 @param frame:视图的大小
 @param nibNameOrNil:要加载的xib名称，默认为类名
 @return 返回加载后的视图
 */
-(id)initWithFrame:(CGRect)frame nibNameOrNil:(NSString *)nibNameOrNil;

/**
 *  设置控件的圆角，边线宽度，边线颜色
 *
 *  @param cornerRadius 圆角大小
 *  @param borderWidth  边线宽度
 *  @param borderColor  边线颜色
 */
-(void)setCornerRadius:(CGFloat)cornerRadius borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor;
@end
